package com.entity;

import java.io.Serializable;
import java.util.Date;

import org.swift.util.encrypt.Security;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wcansoft.baseWeb.mybatis_plugin.orm.anotation.Table;
@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "user_oauth", id = "id", auto_increment = true)
public class UserOauth implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private Long uid;
	private Date created;
	private Date updated;
	private String oauth;
	private String openid;
	private Long status;
	private String nickname;
	
	public Date getCreated() {
		return created;
	}
	public void setCreated(Date created) {
		this.created = created;
	}
	public Date getUpdated() {
		return updated;
	}
	public void setUpdated(Date updated) {
		this.updated = updated;
	}
	public String getToken()
	{
		return Security.SHA1(Security.MD5(openid));
	}
	public Long getUid() {
		return uid;
	}
	public void setUid(Long uid) {
		this.uid = uid;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getOauth() {
		return oauth;
	}
	public void setOauth(String oauth) {
		this.oauth = oauth;
	}
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	public Long getStatus() {
		return status;
	}
	public void setStatus(Long status) {
		this.status = status;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	
}
